<?php
class main extends db
{
    public function index()
    {
        $this->usershell();
        $sequence = '';

        if($_REQUEST['code'])
        {
            $sequence = $_REQUEST['code'];
        }
        
        if(!empty($_REQUEST['main_sub']))
        {
            $cha_rs = $this->change_userinfo();
            switch ($cha_rs) 
            {
                case TRUE:
                    echo "<script>alert('修改成功')</script>";
                    break;
                case FALSE:
                    echo "<script>alert('修改失败')</script>";
                    break;
            }
        } 
        
        $member = $this->get_member_by_unit($sequence);

        $this->assign("member",$member);
             
        $this->assign("title","管理界面");
        
        $this->assign("sex",array('女','男'));
        
        $this->display("main.tpl");
    }
}
?>
